package com.zhelun.demo;

import android.support.annotation.NonNull;

import demo.bocweb.com.sdk.apiHelper.RetrofitCreateHelper;
import demo.bocweb.com.sdk.apiHelper.RxHelper;
import demo.bocweb.com.sdk.base.BaseModel;
import io.reactivex.Observable;

/**
 * Created by zhelun on 2018/1/18.
 */

public class MovieTop250Model extends BaseModel implements MovieTop250Contract.IMovieTop250Model {
    @NonNull
    public static MovieTop250Model newInstance() {
        return new MovieTop250Model();
    }


    @Override
    public Observable<HotMovieBean> getTopMovieList(int start, int count) {
        return RetrofitCreateHelper.createApi(Api.class, Api.HOST)
                .getMovieTop250(start, count)
                .compose(RxHelper.<HotMovieBean>rxSchedulerHelper());
    }
}
